<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <p>Array.isArray方法返回一个布尔值，表示参数是否为数组。它可以弥补typeof运算符的不足</p>
    <script>
        var num = 10;
        console.log(typeof num);

        var arr = ["iwen",1,"liu"];
        console.log(typeof arr); //本来应该返回array，但实际结果却是object

        var obj = {};  //它的类型才是object
        console.log(typeof obj);

        var arr1 = ["sxt","baizhan","it"];
        console.log(Array.isArray(arr1));//arr1是数组返回值true

        console.log(Array.isArray(obj));//obj不是数组，返回值false

    </script>
</body>
</html>